#ifndef EQC_H
#define EQC_H

#include <QtGui/QMainWindow>

#include "filesystem.h"
#include "../Controller/controller.h"
#include <ui_esobre.h>
#include <ui_csvconfig.h>
#include <ui_magSwitcher.h>
#include <ui_polyfunction.h>
#include <ui_polyfunction_2.h>
#include <ui_polyfunction_3.h>


class QTableWidget;
class QAction;

namespace Ui {
	class MyEqC;
}

class MyEqC : public QMainWindow
{
    Q_OBJECT

public:
    explicit MyEqC(QWidget *parent = 0);
    ~MyEqC();
	Ui::MyEqC* getMyEqC() { return ui;};

 void refresh();

private:

 void resetMagConvArg();


private:
	Ui::MyEqC *ui;

 Ui::MagSwitcher m_magSwt;
 QDialog *m_magSwitcher;

 Ui::PolyFunction m_pFunction;
 QDialog *m_polyFunction;
 Ui::PolyFunction_2 m_pFunction_2;
 QDialog *m_polyFunction_2;
 Ui::PolyFunction_3 m_pFunction_3;
 QDialog *m_polyFunction_3;

 Ui::Creditos m_abt;
 QDialog *m_about;

 Ui::CSVConfig m_csvc;
	QDialog *m_csvconfig;
	

 int m_sorted;

 FileSystem m_filesystem;

 double m_weightsMb[6];
 double m_weightsA[6];
 double m_a1[6];
 double m_b1[6];
 double m_c1[6];
 double m_a2[6];
 double m_b2[6];
 double m_c2[6];
 int m_count;
 int m_magConvType;

private slots:
 void on_actionOpen_triggered();
 void on_actionSave_triggered();
 void on_actionQuit_triggered();
 void on_actionAbout_triggered();
 void on_actionMagnitude_Function_triggered();
 void on_actionSort_triggered();
 void on_actionCSV_Configuration_triggered();

 //Buttons in Qdialogs
 void okmagConvertionClicked();

 void okpolyfunctionClicked();
 void cancelpolyfunctionClicked();

 void okpolyfunctionClicked_2();
 void cancelpolyfunctionClicked_2();
 void nextpolyfunctionClicked_2();
 void prevpolyfunctionClicked_2();

 void okpolyfunctionClicked_3();
 void cancelpolyfunctionClicked_3();
 void nextpolyfunctionClicked_3();
 void prevpolyfunctionClicked_3();

 void okCSVClicked();
 void cancelCSVClicked();


};

#endif // EQC_H
